<html lang="en" xmlns:th="http://www.thymeleaf.org">
<div class="product_hd" ng-class="{'product_hd_fixed':isFlag}">
    <div class="container">
        <div class="product_title fl">
            <h1>{{product.id}}</h1>
            <h1>{{product.name}}</h1>
        </div>
        <div class="product_buy fr">
<!--            <a ui-sref="buyNow({productId:product.productId})" class="btn btn-primary">立即购买</a>-->
            <a id="buy" th:href="'/web/index/buyNowPage/'" class="btn btn-primary">立即购买</a>
        </div>
<!--        <div class="product_nav fr">-->
<!--            <ul>-->
<!--                <li ng-repeat="navItem in product.details">-->
<!--                    <a ui-sref="home.products.detail({detailType:navItem.name})"-->
<!--                            ui-sref-active="active">{{navItem.name}}</a>-->
<!--                </li>-->
<!--            </ul>-->
        </div>
    </div>
</div>

<!-- product detail info-->
<div ui-view></div>



<script th:inline="javascript">

    let id='';

    setTimeout(function () {
        $.ajax({
            url: "/web/index/view/getCookie",
            type: "GET",
            async:false,
            success: function (data) {
                id=data;
            }
        });
    },30);



    setTimeout(function () {
        console.log(document.getElementById('buy').href)
        console.log(id);

        document.getElementById('buy').href+=id;

    },40);

</script>






</html>